﻿/**
 * This is a part of MCServe, which is available under the Apache license 2.0.
 * With this code, you may do whatever you want as long as that is not in conflict with this license.
 * In addition, you should have a reference to the original project to include (http://mcserve.codeplex.com).
 * 
 * Author       : Lars Krämer ( Xe77a )
 * Website      : http://www.lkraemer.de
 * Project      : MCServe (http://mcserve.codeplex.com)
 * Copyright    : Copyright (c) 2013 lkraemer.de
 * License      : http://mcserve.codeplex.com/license
 * Description  : This part contains functions for the update organization
 */

using System;

namespace MCServeUpdate
{
    public class Settings
    {
        /**
         * ##################################################
         * ReadOnly Variables
         * ##################################################
         */
        public static String UpdateUri
        {
            get
            {
                /**
                 * {0}  Build-Uuid
                 */
                //return "http://www.mcserve.org/Update/{0}";
                return "http://localhost:24943/Update/{0}";
            }
        }
 
        public static String SettingsFile
        {
            get
            {
                /**
                 * Returns the FILE-NAME for the properties-file without path, etc.
                 */
                return "updatemanager.properties";
            }
        }
 
        public static String CurrentPath
        {
            get
            {
                /**
                 * Returns the current path to MCServeUpdate.exe (Update Manager)
                 */
                return System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);
            }
        }

        /**
         * ##################################################
         * Read and Write Variables
         * ##################################################
         */
        private static Uri _UpdatePacketUri = null;
        public static Uri UpdatePacketUri
        {
            /**
             * Contains the path for the downloadable ZIP-File
             */
            get
            {
                return _UpdatePacketUri;
            }
            set
            {
                _UpdatePacketUri = value;
            }
        }

        private static String _ServerPath = "";
        public static String ServerPath
        {
            /**
             * Path to the MCServe executables
             */
            get
            {
                return _ServerPath;
            }
            set
            {
                _ServerPath = value;
            }
        }
    }
}
